GenerationConfig.Builder

class GenerationConfig.Builder


Builder for creating a GenerationConfig.

Mainly intended for Java interop. Kotlin consumers should use generationConfig for a more idiomatic experience.

See also
generationConfig

Summary

Public constructors

Public functions

GenerationConfig

Create a new GenerationConfig with the attached arguments.

Public properties

Int?

The max unique responses to return

Int?

The max tokens to generate per response

List<String>?

A list of strings to stop generation on occurrence of

Float?

The degree of randomness in token selection, typically between 0 and 1

Int?

The sum of probabilities to collect to during token selection

Float?

How many tokens to select amongst the highest probabilities

Public constructors

Builder

Builder()

Public functions

build

fun build(): GenerationConfig

Create a new GenerationConfig with the attached arguments.

Public properties

candidateCount

var candidateCountInt?

The max unique responses to return

maxOutputTokens

var maxOutputTokensInt?

The max tokens to generate per response

stopSequences

var stopSequencesList<String>?

A list of strings to stop generation on occurrence of

temperature

var temperatureFloat?

The degree of randomness in token selection, typically between 0 and 1

topK

var topKInt?

The sum of probabilities to collect to during token selection

topP

var topPFloat?

How many tokens to select amongst the highest probabilities